package com.infore.statisticsAndAlarm.externalInterface;

import java.util.List;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.infore.statisticsAndAlarm.select.dto.QueryParamDto;
import com.infore.statisticsAndAlarm.util.ResultEntity;

import io.swagger.annotations.ApiOperation;

@FeignClient(name="SiteManagement-Service", url="localhost:61007/SiteManagement-Service/")
public interface IStieMangementService {

	/**通过因子编码取得因子信息**/
	@RequestMapping(value = "outSide/proiectInfoAlarm", method = RequestMethod.POST)
	@ResponseBody
	ResultEntity queryProjectByProjectCode();
	
	/**根据筛选条件得到站点编码**/
	@ApiOperation(value = "根据筛选条件得到站点编码")
    @ResponseBody
    @GetMapping(value = "outSide/queryStationMnByInfo")
    public ResultEntity queryStationMnByInfo(@RequestParam(value = "provinceId",required = false) String provinceId,
    		@RequestParam(value = "basinnId",required = false) String basinnId,
    		@RequestParam(value = "stationClassifyId",required = false) String stationClassifyId,
    		@RequestParam(value = "stationTypeId",required = false) String stationTypeId,
    		@RequestParam(value = "operCompanyId",required = false) String operCompanyId,
    		@RequestParam(value = "stationName",required = false) String stationName,
    		@RequestParam(value = "userId",required = false) String userId,
    		@RequestParam(value = "platfrom",required = false) String platfrom,
    		@RequestParam(value = "appCode",required = false) String appCode,
    		@RequestParam(value = "admin",required = false) String admin) ;
    
	/**通过单个站点编码取得因子编码**/
	@ApiOperation(value = "通过单个站点编码取得因子编码")
	@ResponseBody
	@GetMapping(value = "statisAndAlarm/queryProjectByStationMn")
	public ResultEntity queryProjectByStationMn(@RequestParam(value = "stationMn",required = true) String stationMn);
	
	/**通过站点编码取得站点名称**/
	@ApiOperation(value = "通过站点编码取得站点名称")
	@ResponseBody
	@GetMapping(value = "statisAndAlarm/queryNameByStationMn")
	public ResultEntity queryNameByStationMn(@RequestParam(value = "stationMn",required = true) String stationMn);

	/**根据区域编码/流域返回站点部分信息**/
	@ApiOperation(value = "根据区域编码/流域返回站点部分信息")
	@ResponseBody
	@GetMapping(value = "statisAndAlarm/queryStationInfoByCodes")
	public ResultEntity queryStationInfoByCodes(@RequestParam(value = "queryCode",required = true) String queryCode,
			@RequestParam(value = "queryType",required = true) String queryType,
			@RequestParam(value = "userId",required = false) String userId,
			@RequestParam(value = "platform",required = false) String platform,
			@RequestParam(value = "appCode",required = false) String appCode,
			@RequestParam(value = "admin",required = false) String admin);
	
	/**根据区域编码/流域返回区域流域部分信息**/
	@ApiOperation(value = "根据区域编码/流域返回站点部分信息")
	@ResponseBody
	@GetMapping(value = "statisAndAlarm/queryAreaByAreaCode")
	public ResultEntity queryAreaByAreaCode(@RequestParam(value = "queryCode",required = true) String queryCode,
			@RequestParam(value = "queryType",required = true) String queryType);

	@ApiOperation(value = "根据mn拿到站点所有信息")
    @ResponseBody
    @GetMapping(value = "statisAndAlarm/queryAllInfoByMn")
    public ResultEntity queryAllInfoByMn(@RequestParam(value = "queryCode",required = true) String queryCode);
	
	/** 获取站点信息 **/
	@RequestMapping(value = "station/query", method = RequestMethod.POST)
	@ResponseBody
	ResultEntity queryStation(@RequestBody QueryParamDto queryParamDto);
	
	/**通过站点mn获取因子集合**/
    @ResponseBody
    @PostMapping(value = "statisAndAlarm/queryProjectByMn")
    ResultEntity queryProjectByMn(@RequestParam(value="mns",required=false) List<String> mns);
    
}
